<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>anchor</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>Don't Touch White Tile - The Dress</title>

</head>
<body>
	<canvas id="stage"></canvas>
	<script src="../dist/go2d.js"></script>
	<script>
	var stage = new go2d.Stage('stage');
	stage.name = 'stage';
	stage.width = 800;
	stage.height = 600;
	stage.anchorX = 0.5;
	stage.anchorY = 0.5;

	var s1 = new go2d.Sprite();
	s1.name = 's1';
	s1.anchorX = 0.5;
	s1.anchorY = 0.5;
	s1.width = 200;
	s1.height = 200;
	s1.rotation = 30 * go2d.Matrix.DEG_TO_RAD;
	s1.background = 'rgba(0, 0, 0, 0.3)';

	var s2 = new go2d.Sprite();
	s2.name = 's2';
	s2.anchorX = 0.5;
	s2.anchorY = 0.5;
	s2.width = 100;
	s2.height = 100;
	s2.rotation = -30 * go2d.Matrix.DEG_TO_RAD;
	s2.background = 'rgba(0, 0, 0, 0.3)';

	stage.on('touchtap', function(e){
		console.log('stage', e);
	});
	s1.on('touchtap', function(e){
		console.log(1, e);
	});
	s2.on('touchtap', function(e){
		console.log(2, e);
	});
	stage.addChild(s1);
	s1.addChild(s2);
	</script>
</body>
</html>